<!--#include file="conn.asp"-->
<!--#include file="chkuser.asp"-->
<%
call adminRight(0)
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加页面</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="./../kindeditor/kindeditor.js"></script>
</head>
<body>
   <form method="post" name="myform" action="Admin_information_Save.asp?action=add" onSubmit="return checkadd()">
    <div id="frame_Toolbar" class="toolbarBg"> 
		<a href="javascript:self.history.back();" class="icoBtn_ct"><span class="btnIco btnBack"></span>返回</a> 
		<a href="javascript:self.location.reload();" class="icoBtn_ct"><span class="btnIco btnReload"></span>刷新</a> 
		<span class="split ftSplit" ></span>
	<div id="guide" class="light_orange">请填写信息！</div>
	<div class="pageInfo right light_gray"></div>
    </div>
    <table class="cTable_2 table">
	<tr class="cTitle toolbarBg">
		<td colspan="2"><div class="cLeftPadding">添加页面内容</div></td>
	</tr>
	<tr>
		<td class="tRight" width="15%">标题：</td>
		<td><input name="Title" type="text" maxlength="255" style="width:300px;" />
      <span id="RequiredFieldValidator1" style="color:Red;">*</span></td>
	</tr>
	<tr style="display:none">
	  <td class="tRight">小图：</td>
	  <td><input name="pic" type="text" id="pic" style="width:300px;" maxlength="255" /><iframe src="Upload_form_lt.asp?n=pic&x=1" height="25" width="350" frameborder="0"></iframe></td>
	  </tr>
	<tr>
	  <td valign="top" class="tRight"></td>
	  <td><div style="width:650px; text-align:right; padding-top:8px"><span style="float:right"><iframe src="Upload_form_lt.asp?n=Content&x=2" height="25" width="320" frameborder="0"></iframe></span><span style="float:right; padding-top:4px">图片或文件快速上传：</span></div></td>
    </tr>
	<tr>
		<td valign="top" class="tRight">内容：</td>
		<td>
	    <script type="text/javascript">
		KE.show({
			id : 'Content',
			allowFileManager : true,
			afterCreate : function(id) {
				KE.blur(id);
			}
		});
	    </script>
		<div class="editor">
        <textarea id="Content" name="Content" style="width:650px;height:350px;visibility:hidden;"></textarea>
        </div>
	    </td>
	</tr>
	<tr>
	  <td class="tRight">首页图片：</td>
	  <td><input name="DefaultPicUrl" type="text" id="DefaultPicUrl" value="images/nopic.gif" style="width:300px" maxlength="255" readonly="readonly"> 
                    <br>
                    首页的图片,直接从上传图片中选择： 
                    <select name="DefaultPicList" id="select" onChange="DefaultPicUrl.value=this.value;">
                      <option selected value="images/nopic.gif">不指定首页图片</option>
                    </select> <input name="UploadFiles" type="hidden" id="UploadFiles" >
                    </td>
	  </tr>
	<tr>
	  <td class="tRight">发布日期：</td>
	  <td><input name="AddDate" type="text" id="AddDate" value="<%=now()%>">
	    请保持原有格式</td>
	  </tr>
	<tr>
	  <td class="tRight">推荐：</td>
	  <td><input name="Show" type="checkbox" id="Show" value="True" />	  </td>
	  </tr>
    </table>
    <div id="cEndToolbar" class="toolbarBg">
      <div class="caButCase">
		    <input type="submit" name="Submit" value="确认添加" class="button">
	        <input type="reset" name="Submit2" value="清空重填" class="button">
      </div>
    </div>
  </form>
</body>
</html>
<script language="javascript">

function AddItem(strFileName){
  document.myform.DefaultPicUrl.value=strFileName;
  document.myform.DefaultPicList.options[document.myform.DefaultPicList.length]=new Option(strFileName,strFileName);
  document.myform.DefaultPicList.selectedIndex+=1;
  if(document.myform.UploadFiles.value==''){
	document.myform.UploadFiles.value=strFileName;
  }
  else{
    document.myform.UploadFiles.value=document.myform.UploadFiles.value+"|"+strFileName;
  }
}


function checkadd()
{
	if(document.myform.Title.value==""){  
		alert("请填写标题!");  
		document.myform.Title.focus();  
		return (false);  
	}
}
</script>